package com.ces.knacky.model;

import java.io.Serializable;
import java.util.Set;

import org.apache.commons.lang.builder.EqualsBuilder;

import com.ces.knacky.framework.model.AbstractParentEntity;

/** @author Hibernate CodeGenerator */
public class State extends AbstractParentEntity implements Serializable {
    /** persistent field */
    private com.ces.knacky.model.Country country;

    /** persistent field */
    private Set locations;

    /** full constructor */
    public State(String description, com.ces.knacky.model.Country country, com.ces.knacky.model.Flag flag, Set locations) {
        this.description = description;
        this.country = country;
        this.flag = flag;
        this.locations = locations;
    }

    /** default constructor */
    public State() {
    }

    public com.ces.knacky.model.Country getCountry() {
        return this.country;
    }

    public void setCountry(com.ces.knacky.model.Country country) {
        this.country = country;
    }

    public Set getLocations() {
        return this.locations;
    }

    public void setLocations(Set locations) {
        this.locations = locations;
    }

    public boolean equals(Object other) {
        if ( !(other instanceof State) ) return false;
        State castOther = (State) other;
        return new EqualsBuilder()
            .append(this.getId(), castOther.getId())
            .isEquals();
    }

}
